<include file="Public:header"/>

<div class="data_list">
	<table>
		<tr>
			<th width="30"><input type="checkbox" onclick="$.checkbox(this,'.select-box')"></th>
			<th width="60">ID</th>
			<th>名称</th>
			<th width="50">排序</th>
			<th width="80" {:D('Role')->is_acl('checkbox?type=' . $type . '&field_name=is_input_text')}>输入文本</th>
			<th width="30" {:D('Role')->is_acl('checkbox?type=' . $type . '&field_name=status')}>启用</th>
			<th width="100">操作</th>
		</tr>
		<volist name="list" id="rs">
		<tr class="data-{$rs['id']}">
			<td class="select-box">
				<input type="checkbox" name="ids[]" value="{$rs['id']}">
				<input type="hidden" name="id[{$rs['id']}]" value="{$rs['id']}">
			</td>
			<td>{$rs['id']}</td>
			<td>
				<input class="td-txt" type="text" name="title[{$rs['id']}]" value="{$rs['title']}" style="width:200px;">
			</td>
			<td>
				<input class="w40 tac td-txt" type="text" name="order_id[{$rs['id']}]" value="<if condition="$rs['order_id'] neq '999999'">{$rs['order_id']}</if>">
			</td>
			<td {:D('Role')->is_acl('checkbox?type=' . $type . '&field_name=is_input_text')}>
				<input class="ajax_checkbox" url="{:URL('checkbox',array('type'=>$type, 'field_name'=>'is_input_text', 'id' => $rs['id'], 'name' => 'id'))}" type="checkbox" <eq name="rs.is_input_text" value="1">checked</eq> value="1" />
			</td>
			<td {:D('Role')->is_acl('checkbox?type=' . $type . '&field_name=status')}>
				<input class="ajax_checkbox" url="{:URL('checkbox',array('type'=>$type, 'field_name'=>'status', 'id' => $rs['id'], 'name' => 'id'))}" type="checkbox" <eq name="rs.status" value="1">checked</eq> value="1" />
			</td>
			<td>
				<a href="{:URL('edit', array('type'=>$type, 'id'=>$rs['id']))}" title="修改">
					<i class="if if-edit"></i>
				</a>
				<a href="{:URL('delete', array('type' => $type, 'id' => $rs['id']))}" class="btn-confirm-opt delete-opt" title="{$rs['title']}" del-class="data-{$rs['id']}">
					<i class="if if-delete"></i>
				</a>
			</td>
		</tr>
		</volist>
	</table>
</div>

<notempty name="page"><div class="page">{$page}</div></notempty>
<div class="batch_opt">
	<span class="btn btn-delete selected-delete" url="{:URL('delete', array('type' => $type))}">删除选中</span>
	<span class="btn btn-edit batch-edit">批量修改</span>
	<span class="btn btn-add" url="{:URL('add', array('type' => $type))}">添加</span>
</div>

<include file="Public:footer"/>